#include <iostream>
using namespace std;

class Complex {
		double real;
		double img;
	public:
		Complex(double r = 0, double i = 0): real(r), img(i) {};
		Complex operator+(int r) {
			return Complex(real + r, img);
		}
		friend Complex operator+(int r, const Complex &b) {
			return Complex(r + b.real, b.img);
		}
		Complex operator-(int a) {
			return Complex(real - a, img);
		}
		friend Complex operator-(int a, const Complex &o) {
			return  Complex(a - o.real, o.img);
		}
		void display() {
			cout << real << "," << img << endl;
		}
};

int main() {
	Complex c1(2, 3), c2(3, 4);
	c1 = c1 + 5;
	c2 = 5 + c2;
	c1.display();
	c2.display();
	Complex c3(4, 5), c4(5, 6);
	c3 = 5 - c3;
	c4 = c4 - 5;
	c3.display();
	c4.display();
	return 0;
}